var status = -1;
var selectionLog = [];

function start(d, c, b) {
    if (status == 0 && d == 0) {
        qm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status == a++) {
            qm.forceStartQuest(32312, "");
            qm.dispose()
        }
    }
}

function stage0(d, c, b) {
    if (status == 0 && d == 0) {
        qm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status == a++) {
            var e = qm.getQuest();
            qm.askYesNo("这个任务的依次对话脚本还没有修复哦。它的脚本位于： #b 脚本/任务/32312.js#k\r\n\r\n如果你有兴趣，欢迎一起来修复！\r\n\r\n那么现在，你要立刻开始这个任务吗？")
        } else {
            if (status == a++) {
                qm.forceStartQuest();
                qm.dispose()
            }
        }
    }
}

function end(d, c, b) {
    if (status == 0 && d == 0) {
        qm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status == a++) {
            qm.sendNormalTalk("把这个封印石放到这个破碎的位置上就行了吧？", 3, 1520026, false, true)
        } else {
            if (status === a++) {
                qm.sendNormalTalk("好，上吧！", 3, 1520026, true, true)
            } else {
                if (status === a++) {
                    qm.gainExp(125000);
                    qm.curNodeEventEnd(true);
                    qm.setInGameDirectionMode(true, true, false);
                    qm.inGameDirectionEvent_AskAnswerTime(300)
                } else {
                    if (status === a++) {
                        qm.fieldEffect_ScreenMsg("adventureStory/screenMsg/0");
                        qm.inGameDirectionEvent_AskAnswerTime(3000)
                    } else {
                        if (status === a++) {
                            qm.inGameDirectionEvent_头顶图片(["Effect/Direction12.img/effect/story/BalloonMsg1/0"], [1200, 0, -120, 0, 0, 0, 0, 0, 0]);
                            qm.inGameDirectionEvent_AskAnswerTime(1800)
                        } else {
                            if (status === a++) {
                                qm.fieldEffect_PlayBGM("Bgm26.img/DarkMage", 0, 0);
                                qm.inGameDirectionEvent_PushMoveInfo(0, 240, 0, -500)
                            } else {
                                if (status === a++) {
                                    qm.inGameDirectionEvent_AskAnswerTime(4220)
                                } else {
                                    if (status === a++) {
                                        qm.inGameDirectionEvent_AskAnswerTime(2000)
                                    } else {
                                        if (status === a++) {
                                            qm.inGameDirectionEvent_PushMoveInfo(1, 0, 0, 0)
                                        } else {
                                            if (status === a++) {
                                                qm.inGameDirectionEvent_AskAnswerTime(0)
                                            } else {
                                                if (status === a++) {
                                                    qm.inGameDirectionEvent_AskAnswerTime(2000)
                                                } else {
                                                    if (status === a++) {
                                                        qm.playerMessage(-1, "黑魔法师睁开了眼睛。可以与封印中的黑魔法师对话。");
                                                        qm.inGameDirectionEvent_ForcedFlip15(700, 0, 0, 0, 0);
                                                        qm.setInGameDirectionMode(false, true, false);
                                                        qm.forceCompleteQuest(32312);
                                                        qm.dispose()
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};